#include "Threshold.h"
#include <opencv2\imgproc\imgproc.hpp>

Threshold::Threshold(int level) : Filter(1,1), level(level)
{
}


Threshold::~Threshold(void)
{
}

void Threshold::Process()
{
	cv::cvtColor(*inputs[0], outputs[0], CV_BGR2GRAY);
	/*cv::threshold(outputs[0], outputs[0], 100, 255, cv::THRESH_BINARY);*/
	cv::adaptiveThreshold(outputs[0], outputs[0], 255, cv::ADAPTIVE_THRESH_MEAN_C, cv::THRESH_BINARY, 65, 0);
}
